#!/usr/bin/env python


import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from runtest_dalton import Filter, TestRun

test = TestRun(__file__, sys.argv)

f = Filter()



#gauge_or
f.add(string = 'Center of mass gauge origin',
      rel_tolerance = 1.0e-5)

#dipole
f.add(from_string = 'Dipole moment',
      num_lines = 5,
      mask = [1],
      rel_tolerance = 1.0e-5)

#nuc
f.add(string = 'Nuclear repulsion energy',
      rel_tolerance = 1.0e-10)

#tes
f.add(string = 'Total number of tesserae',
      rel_tolerance = 1.0e-1)

#sym
f.add(string = 'Point group',
      rel_tolerance = 1.0e-5)

#cmass
#f.add(string = 'Center-of-mass',
#      rel_tolerance = 1.0e-5)

#shield
f.add(from_string = 'Indirect spin-spin coupling between ',
      num_lines = 17,
      abs_tolerance = 2.1e-3)

test.run(['shield_spin.dal'], ['C2H3Li_STO-3G.mol'], f={'out': f})

sys.exit(test.return_code)
